package com.openlogic.common.core.enums;

/**
 * 字典 枚举类
 * 
 * @author xm
 */
public class DictEnum {

	/**
	 * 删除标识
	 */
	public enum DEL_FLAG {
		OK(0, "正常"), DELETED(1, "删除");

		final int value;
		final String name;

		public int getValue() {
			return value;
		}

		public String getName() {
			return name;
		}

		private DEL_FLAG(int value, String name) {
			this.value = value;
			this.name = name;
		}

	}

	/**
	 * 通用状态
	 */
	public enum COMMON_STATUS {
		OK("0", "正常"), DISABLE("1", "停用");

		final String value;
		final String name;

		public String getValue() {
			return value;
		}

		public String getName() {
			return name;
		}

		private COMMON_STATUS(String value, String name) {
			this.value = value;
			this.name = name;
		}

	}

	/**
	 * 通用成功失败状态
	 */
	public enum COMMON_SUCCESS_FAIL {
		SUCCESS("0", "成功"), FAIL("1", "失败");

		final String value;
		final String name;

		public String getValue() {
			return value;
		}

		public String getName() {
			return name;
		}

		private COMMON_SUCCESS_FAIL(String value, String name) {
			this.value = value;
			this.name = name;
		}

	}

	/**
	 * 通用是否
	 */
	public enum COMMON_YES_NO {
		YES("Y", "是"), NO("N", "否");

		final String value;
		final String name;

		public String getValue() {
			return value;
		}

		public String getName() {
			return name;
		}

		private COMMON_YES_NO(String value, String name) {
			this.value = value;
			this.name = name;
		}

	}

	/** 常规：公共私有列表（0公共 1私有） */
	public enum DicCommonPrivate {

		COMMON("0", "公共"), PRIVATE("1", "私有");

		private final String code;
		private final String info;

		DicCommonPrivate(String code, String info) {
			this.code = code;
			this.info = info;
		}

		public String getCode() {
			return code;
		}

		public String getInfo() {
			return info;
		}
	}

}
